settings in config.h.
Set the upper limit for DMADOM and swiotlb allocations to be 30 bits
(1G) instead of 31 bits, to allow the b44 NIC driver to work.
Signed-off-by: Stephen Tweedie <sct@redhat.com>
*/
#define IO_TLB_SHIFT 11
-/* Width of DMA addresses in the IO TLB. 31 bits is an aacraid limitation. */
-#define IO_TLB_DMA_BITS 31
+/* Width of DMA addresses in the IO TLB. 30 bits is a b44 limitation. */
+#define IO_TLB_DMA_BITS 30
static int swiotlb_force;
static char *iotlb_virt_start;
(exch.out.address_bits <
(get_order_from_pages(max_page) + PAGE_SHIFT)) )
{
- if ( exch.out.address_bits < 31 )
+ if ( exch.out.address_bits < MAX_DMADOM_BITS )
{
rc = -ENOMEM;
goto fail_early;
(reservation.address_bits <
(get_order_from_pages(max_page) + PAGE_SHIFT)) )
{
- if ( reservation.address_bits < 31 )
+ if ( reservation.address_bits < MAX_DMADOM_BITS )
return start_extent;
args.memflags = MEMF_dma;
}
#define CONFIG_IOSAPIC
#define supervisor_mode_kernel (0)
-#define MAX_DMADOM_PFN (0x7FFFFFFFUL >> PAGE_SHIFT) /* 31 addressable bits */
+#define MAX_DMADOM_BITS 30
+#define MAX_DMADOM_MASK ((1UL << MAX_DMADOM_BITS) - 1)
+#define MAX_DMADOM_PFN (MAX_DMADOM_MASK >> PAGE_SHIFT)
/* If PERFC is used, include privop maps. */
#ifdef PERF_COUNTERS
/* Debug stack is restricted to 8kB by guard pages. */
#define DEBUG_STACK_SIZE 8192
-#define MAX_DMADOM_PFN 0x7FFFFUL /* 31 addressable bits */
+#define MAX_DMADOM_BITS 30
+#define MAX_DMADOM_MASK ((1UL << MAX_DMADOM_BITS) - 1)
+#define MAX_DMADOM_PFN (MAX_DMADOM_MASK >> PAGE_SHIFT)
#ifndef __ASSEMBLY__
extern unsigned long _end; /* standard ELF symbol */